import React from 'react'
import { FormattedMessage } from 'react-intl'
import {TwsReactMarkdownPreview} from 'tws-antd'

const OnlineCodingQuiz = ({formItemLayout, FormItem, quiz}) => {
  return (
    <div>
      <FormItem {...formItemLayout} label={<FormattedMessage id='标题' />}>
        <TwsReactMarkdownPreview source={quiz.onlineLanguageName} />
      </FormItem>
      <FormItem {...formItemLayout} label={<FormattedMessage id='描述' />}>
        <TwsReactMarkdownPreview source={quiz.description} />
      </FormItem>
      <FormItem {...formItemLayout} label={<FormattedMessage id='技术栈' />}>
        <span>{quiz.stack}</span>
      </FormItem>
      <FormItem {...formItemLayout} label={<FormattedMessage id='语言' />}>
        <span>{quiz.language}</span>
      </FormItem>
      <FormItem {...formItemLayout} label={<FormattedMessage id='仓库地址' />}>
        <span>{quiz.definitionRepo}</span>
      </FormItem>
    </div>)
}

export default OnlineCodingQuiz
